package com.nbjtjc.safe.activiti.model;

import org.activiti.engine.runtime.ProcessInstance;

import java.util.Date;

/**
 * @auther guqianbin
 * @date 2018/3/28 14:59
 **/
public class MyProcessInstance {
    private String id;
    private String processDefinitionName;
    private String businessKey;
    private String startUserId;
    private Date startTime;
    private String processInstanceId;

    public  static MyProcessInstance getMyProcessInstance(ProcessInstance processInstance){
        MyProcessInstance myProcessInstance=new MyProcessInstance();
        myProcessInstance.setId(processInstance.getId());
        myProcessInstance.setProcessDefinitionName(processInstance.getProcessDefinitionName());
        myProcessInstance.setBusinessKey(processInstance.getBusinessKey());
        myProcessInstance.setStartUserId(processInstance.getStartUserId());
        myProcessInstance.setStartTime(processInstance.getStartTime());
        myProcessInstance.setProcessInstanceId(processInstance.getProcessInstanceId());
        return myProcessInstance;
    }
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProcessDefinitionName() {
        return processDefinitionName;
    }

    public void setProcessDefinitionName(String processDefinitionName) {
        this.processDefinitionName = processDefinitionName;
    }

    public String getBusinessKey() {
        return businessKey;
    }

    public void setBusinessKey(String businessKey) {
        this.businessKey = businessKey;
    }

    public String getStartUserId() {
        return startUserId;
    }

    public void setStartUserId(String startUserId) {
        this.startUserId = startUserId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }
}
